/**
 * 开发任务状态常量定义
 */

// 状态枚举：1:待开始 2:进行中 3:已完成 4:已关闭
export enum MISSION_STATUS {
  NOT_STARTED = 1,
  IN_PROGRESS = 2,
  COMPLETED = 3,
  CLOSED = 4
}

// 状态列表
export const MISSION_STATUS_LIST = [
  {
    value: MISSION_STATUS.NOT_STARTED,
    label: '待开始',
    type: 'info'
  },
  {
    value: MISSION_STATUS.IN_PROGRESS,
    label: '进行中',
    type: 'warning'
  },
  {
    value: MISSION_STATUS.COMPLETED,
    label: '已完成',
    type: 'success'
  },
  {
    value: MISSION_STATUS.CLOSED,
    label: '已关闭',
    type: 'danger'
  }
];

// 状态映射
export const MISSION_STATUS_MAP = MISSION_STATUS_LIST.reduce((acc, item) => {
  acc[item.value] = item;
  return acc;
}, {});

// 状态名称映射
export const MISSION_STATUS_NAMES = MISSION_STATUS_LIST.reduce((acc, item) => {
  acc[item.value] = item.label;
  return acc;
}, {});
